<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  <html xmlns="http://www.w3.org/1999/xhtml">
		<head>
			<!-- template designed by Marco Von Ballmoos -->
			<title>File Source for DatasourceObject.php</title>
			<link rel="stylesheet" href="../media/stylesheet.css" />
			<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
		</head>
		<body>
						<h1>Source for file DatasourceObject.php</h1>
<p>Documentation is available at <a href="../Disperse/_php---datasource---DatasourceObject.php.html">DatasourceObject.php</a></p>
<div class="src-code">
<div class="src-code"><ol><li><div class="src-line"><a name="a1"></a><span class="src-php">&lt;?php</span></div></li>
<li><div class="src-line"><a name="a2"></a><span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a3"></a><span class="src-doc">&nbsp;*&nbsp;Enhanced&nbsp;client&nbsp;libraries&nbsp;for&nbsp;memcached.&nbsp;&nbsp;Provides&nbsp;optional&nbsp;persistence&nbsp;to&nbsp;generic&nbsp;datasources,</span></div></li>
<li><div class="src-line"><a name="a4"></a><span class="src-doc">&nbsp;*&nbsp;replication&nbsp;among&nbsp;groups&nbsp;of&nbsp;memcached&nbsp;servers&nbsp;and&nbsp;support&nbsp;for&nbsp;sessions&nbsp;(depending&nbsp;on&nbsp;language).</span></div></li>
<li><div class="src-line"><a name="a5"></a><span class="src-doc">&nbsp;*&nbsp;</span></div></li>
<li><div class="src-line"><a name="a6"></a><span class="src-doc">&nbsp;*&nbsp;Requires:&nbsp;</span><span class="src-doc-inlinetag">{@link&nbsp;http://www.danga.com/memcached/&nbsp;memcached}</span><span class="src-doc">,</span></div></li>
<li><div class="src-line"><a name="a7"></a><span class="src-doc">&nbsp;*&nbsp;</span><span class="src-doc-inlinetag">{@link&nbsp;http://www.php.net/&nbsp;PHP&nbsp;5}</span><span class="src-doc">,</span></div></li>
<li><div class="src-line"><a name="a8"></a><span class="src-doc">&nbsp;*&nbsp;</span><span class="src-doc-inlinetag">{@link&nbsp;http://pecl.php.net/memcache&nbsp;pecl_memcache}</span><span class="src-doc">&nbsp;and</span></div></li>
<li><div class="src-line"><a name="a9"></a><span class="src-doc">&nbsp;*&nbsp;</span><span class="src-doc-inlinetag">{@link&nbsp;http://www.php.net/pdo&nbsp;PDO}</span><span class="src-doc">&nbsp;(for&nbsp;persistence,&nbsp;if&nbsp;applicable)</span></div></li>
<li><div class="src-line"><a name="a10"></a><span class="src-doc">&nbsp;*&nbsp;</span></div></li>
<li><div class="src-line"><a name="a11"></a><span class="src-doc">&nbsp;*&nbsp;Copyright&nbsp;(C)&nbsp;2009&nbsp;Jeff&nbsp;Trudeau</span></div></li>
<li><div class="src-line"><a name="a12"></a><span class="src-doc">&nbsp;*&nbsp;</span></div></li>
<li><div class="src-line"><a name="a13"></a><span class="src-doc">&nbsp;*&nbsp;This&nbsp;program&nbsp;is&nbsp;free&nbsp;software:&nbsp;you&nbsp;can&nbsp;redistribute&nbsp;it&nbsp;and/or&nbsp;modify&nbsp;it&nbsp;under&nbsp;the&nbsp;terms&nbsp;of&nbsp;the</span></div></li>
<li><div class="src-line"><a name="a14"></a><span class="src-doc">&nbsp;*&nbsp;GNU&nbsp;General&nbsp;Public&nbsp;License&nbsp;as&nbsp;published&nbsp;by&nbsp;the&nbsp;Free&nbsp;Software&nbsp;Foundation,&nbsp;either&nbsp;version&nbsp;3&nbsp;of&nbsp;the</span></div></li>
<li><div class="src-line"><a name="a15"></a><span class="src-doc">&nbsp;*&nbsp;License,&nbsp;or&nbsp;(at&nbsp;your&nbsp;option)&nbsp;any&nbsp;later&nbsp;version.</span></div></li>
<li><div class="src-line"><a name="a16"></a><span class="src-doc">&nbsp;*&nbsp;</span></div></li>
<li><div class="src-line"><a name="a17"></a><span class="src-doc">&nbsp;*&nbsp;This&nbsp;program&nbsp;is&nbsp;distributed&nbsp;in&nbsp;the&nbsp;hope&nbsp;that&nbsp;it&nbsp;will&nbsp;be&nbsp;useful,&nbsp;but&nbsp;WITHOUT&nbsp;ANY&nbsp;WARRANTY;</span></div></li>
<li><div class="src-line"><a name="a18"></a><span class="src-doc">&nbsp;*&nbsp;without&nbsp;even&nbsp;the&nbsp;implied&nbsp;warranty&nbsp;of&nbsp;MERCHANTABILITY&nbsp;or&nbsp;FITNESS&nbsp;FOR&nbsp;A&nbsp;PARTICULAR&nbsp;PURPOSE.&nbsp;&nbsp;See</span></div></li>
<li><div class="src-line"><a name="a19"></a><span class="src-doc">&nbsp;*&nbsp;the&nbsp;GNU&nbsp;General&nbsp;Public&nbsp;License&nbsp;for&nbsp;more&nbsp;details.</span></div></li>
<li><div class="src-line"><a name="a20"></a><span class="src-doc">&nbsp;*&nbsp;</span></div></li>
<li><div class="src-line"><a name="a21"></a><span class="src-doc">&nbsp;*&nbsp;You&nbsp;should&nbsp;have&nbsp;received&nbsp;a&nbsp;copy&nbsp;of&nbsp;the&nbsp;GNU&nbsp;General&nbsp;Public&nbsp;License&nbsp;along&nbsp;with&nbsp;this&nbsp;program.&nbsp;&nbsp;If</span></div></li>
<li><div class="src-line"><a name="a22"></a><span class="src-doc">&nbsp;*&nbsp;not,&nbsp;see&nbsp;</span><span class="src-doc-inlinetag">{@link&nbsp;http://www.gnu.org/licenses/}</span><span class="src-doc">.</span></div></li>
<li><div class="src-line"><a name="a23"></a><span class="src-doc">&nbsp;*&nbsp;</span></div></li>
<li><div class="src-line"><a name="a24"></a><span class="src-doc">&nbsp;*&nbsp;</span><span class="src-doc-coretag">@package</span><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;Disperse</span></div></li>
<li><div class="src-line"><a name="a25"></a><span class="src-doc">&nbsp;*&nbsp;</span><span class="src-doc-coretag">@author</span><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Jeff&nbsp;Trudeau</span></div></li>
<li><div class="src-line"><a name="a26"></a><span class="src-doc">&nbsp;*&nbsp;</span><span class="src-doc-coretag">@copyright</span><span class="src-doc">&nbsp;&nbsp;Copyright&nbsp;(C)&nbsp;Jeff&nbsp;Trudeau&nbsp;</span><span class="src-doc-inlinetag">{@link&nbsp;http://www.jefftrudeau.org}</span></div></li>
<li><div class="src-line"><a name="a27"></a><span class="src-doc">&nbsp;*&nbsp;</span><span class="src-doc-coretag">@license</span><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;http://opensource.org/licenses/gpl-3.0.html&nbsp;GPLv3</span></div></li>
<li><div class="src-line"><a name="a28"></a><span class="src-doc">&nbsp;*&nbsp;</span><span class="src-doc-coretag">@filesource</span></div></li>
<li><div class="src-line"><a name="a29"></a><span class="src-doc">&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a30"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a31"></a><span class="src-inc">require_once</span><span class="src-sym">(</span><span class="src-id">Disperse</span><span class="src-sym">::</span><span class="src-id">getHome</span><span class="src-sym">(</span><span class="src-sym">)</span>.<span class="src-str">'/php/datasource/Persistable.php'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a32"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a33"></a><span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a34"></a><span class="src-doc">&nbsp;*&nbsp;Abstract&nbsp;class&nbsp;providing&nbsp;some&nbsp;basic&nbsp;shared&nbsp;properties&nbsp;to&nbsp;its&nbsp;children.</span></div></li>
<li><div class="src-line"><a name="a35"></a><span class="src-doc">&nbsp;*&nbsp;</span></div></li>
<li><div class="src-line"><a name="a36"></a><span class="src-doc">&nbsp;*&nbsp;</span><span class="src-doc-coretag">@package</span><span class="src-doc">&nbsp;Disperse</span></div></li>
<li><div class="src-line"><a name="a37"></a><span class="src-doc">&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a38"></a><span class="src-key">abstract&nbsp;</span><span class="src-key">class&nbsp;</span><a href="../Disperse/DatasourceObject.html">DatasourceObject</a>&nbsp;<span class="src-key">implements&nbsp;</span><span class="src-id">Persistable&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a39"></a>&nbsp;&nbsp;</div></li>
<li><div class="src-line"><a name="a40"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a41"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@var&nbsp;</span><span class="src-doc-type">mixed&nbsp;</span></div></li>
<li><div class="src-line"><a name="a42"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a43"></a>&nbsp;&nbsp;<span class="src-key">protected&nbsp;</span><a href="../Disperse/DatasourceObject.html#var$connection">$connection</a><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a44"></a>&nbsp;&nbsp;</div></li>
<li><div class="src-line"><a name="a45"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a46"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@var&nbsp;</span><span class="src-doc-type">mixed&nbsp;</span></div></li>
<li><div class="src-line"><a name="a47"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a48"></a>&nbsp;&nbsp;<span class="src-key">protected&nbsp;</span><a href="../Disperse/DatasourceObject.html#var$isConnected">$isConnected</a><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a49"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a50"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a51"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Deletes&nbsp;the&nbsp;specified&nbsp;element&nbsp;from&nbsp;the&nbsp;datasource.&nbsp;&nbsp;If&nbsp;$key&nbsp;is&nbsp;not&nbsp;specified,&nbsp;all&nbsp;data&nbsp;is</span></div></li>
<li><div class="src-line"><a name="a52"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;removed&nbsp;from&nbsp;the&nbsp;datasource.</span></div></li>
<li><div class="src-line"><a name="a53"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span></div></li>
<li><div class="src-line"><a name="a54"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">mixed&nbsp;</span><span class="src-doc-var">$key&nbsp;</span></div></li>
<li><div class="src-line"><a name="a55"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">string&nbsp;</span><span class="src-doc-var">$table&nbsp;</span><span class="src-doc">=&nbsp;'data'</span></div></li>
<li><div class="src-line"><a name="a56"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a57"></a>&nbsp;&nbsp;<span class="src-key">public&nbsp;</span><span class="src-key">function&nbsp;</span><a href="../Disperse/DatasourceObject.html#methoddelete">delete</a><span class="src-sym">(</span><span class="src-var">$key</span><span class="src-sym">,&nbsp;</span><span class="src-var">$table&nbsp;</span>=&nbsp;<span class="src-str">'data'</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span><span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a58"></a>&nbsp;&nbsp;</div></li>
<li><div class="src-line"><a name="a59"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a60"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Deletes&nbsp;items&nbsp;from&nbsp;the&nbsp;datasource&nbsp;if&nbsp;they&nbsp;are&nbsp;due&nbsp;to&nbsp;expire.</span></div></li>
<li><div class="src-line"><a name="a61"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span></div></li>
<li><div class="src-line"><a name="a62"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">string&nbsp;</span><span class="src-doc-var">$table&nbsp;</span><span class="src-doc">=&nbsp;'data'</span></div></li>
<li><div class="src-line"><a name="a63"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a64"></a>&nbsp;&nbsp;<span class="src-key">public&nbsp;</span><span class="src-key">function&nbsp;</span><a href="../Disperse/DatasourceObject.html#methodexpire">expire</a><span class="src-sym">(</span><span class="src-var">$table&nbsp;</span>=&nbsp;<span class="src-str">'data'</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span><span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a65"></a>&nbsp;&nbsp;</div></li>
<li><div class="src-line"><a name="a66"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a67"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Flushes&nbsp;the&nbsp;entire&nbsp;datasource.</span></div></li>
<li><div class="src-line"><a name="a68"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a69"></a>&nbsp;&nbsp;<span class="src-key">public&nbsp;</span><span class="src-key">function&nbsp;</span><a href="../Disperse/DatasourceObject.html#methodflush">flush</a><span class="src-sym">(</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span><span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a70"></a>&nbsp;&nbsp;</div></li>
<li><div class="src-line"><a name="a71"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a72"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Retrieves&nbsp;the&nbsp;specified&nbsp;element&nbsp;from&nbsp;the&nbsp;datasource,&nbsp;or&nbsp;null&nbsp;if&nbsp;the&nbsp;element&nbsp;does&nbsp;not&nbsp;exist.</span></div></li>
<li><div class="src-line"><a name="a73"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span></div></li>
<li><div class="src-line"><a name="a74"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">mixed&nbsp;</span><span class="src-doc-var">$key&nbsp;</span></div></li>
<li><div class="src-line"><a name="a75"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">string&nbsp;</span><span class="src-doc-var">$table&nbsp;</span><span class="src-doc">=&nbsp;'data'</span></div></li>
<li><div class="src-line"><a name="a76"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@return&nbsp;</span><span class="src-doc-type">mixed&nbsp;</span></div></li>
<li><div class="src-line"><a name="a77"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a78"></a>&nbsp;&nbsp;<span class="src-key">public&nbsp;</span><span class="src-key">function&nbsp;</span><span class="src-sym">&amp;</span><a href="../Disperse/DatasourceObject.html#methodget">get</a><span class="src-sym">(</span><span class="src-var">$key</span><span class="src-sym">,&nbsp;</span><span class="src-var">$table&nbsp;</span>=&nbsp;<span class="src-str">'data'</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span><span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a79"></a>&nbsp;&nbsp;</div></li>
<li><div class="src-line"><a name="a80"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a81"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Returns&nbsp;true&nbsp;if&nbsp;the&nbsp;datasource&nbsp;is&nbsp;connected,&nbsp;false&nbsp;otherwise.</span></div></li>
<li><div class="src-line"><a name="a82"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span></div></li>
<li><div class="src-line"><a name="a83"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@return&nbsp;</span><span class="src-doc-type">boolean&nbsp;</span></div></li>
<li><div class="src-line"><a name="a84"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a85"></a>&nbsp;&nbsp;<span class="src-key">public&nbsp;</span><span class="src-key">function&nbsp;</span><a href="../Disperse/DatasourceObject.html#methodisConnected">isConnected</a><span class="src-sym">(</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span><span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a86"></a>&nbsp;&nbsp;</div></li>
<li><div class="src-line"><a name="a87"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a88"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;Inserts/updates&nbsp;the&nbsp;specified&nbsp;element&nbsp;in&nbsp;the&nbsp;datasource.</span></div></li>
<li><div class="src-line"><a name="a89"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span></div></li>
<li><div class="src-line"><a name="a90"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">mixed&nbsp;</span><span class="src-doc-var">$key&nbsp;</span></div></li>
<li><div class="src-line"><a name="a91"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">mixed&nbsp;</span><span class="src-doc-var">&amp;$value&nbsp;</span></div></li>
<li><div class="src-line"><a name="a92"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">string&nbsp;</span><span class="src-doc-var">$table&nbsp;</span><span class="src-doc">=&nbsp;'data'</span></div></li>
<li><div class="src-line"><a name="a93"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">mixed&nbsp;</span><span class="src-doc-var">$expire&nbsp;</span><span class="src-doc">=&nbsp;CACHE_EXPIRATION</span></div></li>
<li><div class="src-line"><a name="a94"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a95"></a>&nbsp;&nbsp;<span class="src-key">public&nbsp;</span><span class="src-key">function&nbsp;</span><a href="../Disperse/DatasourceObject.html#methodset">set</a><span class="src-sym">(</span><span class="src-var">$key</span><span class="src-sym">,&nbsp;</span><span class="src-sym">&amp;</span><span class="src-var">$value</span><span class="src-sym">,&nbsp;</span><span class="src-var">$table&nbsp;</span>=&nbsp;<span class="src-str">'data'</span><span class="src-sym">,&nbsp;</span><span class="src-var">$expire&nbsp;</span>=&nbsp;<span class="src-id">CACHE_EXPIRATION</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span><span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a96"></a><span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a97"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a98"></a><span class="src-php">?&gt;</span></div></li>
</ol></div>
</div>
	<p class="notes" id="credit">
		Documentation generated on Sat, 06 Mar 2010 15:50:39 -0500 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.1</a>
	</p>
	</body>
</html>